package com.hsnn.medstgmini.pro.base.model;

/**
 * @category 配送关系状态
 * @author wangbing
 * @date 2015-11-19
 *
 */
public enum DelStatus {

	unconfirmed(0, "未确认"), confirmed(1, "已确认"), refused(2, "拒绝"), remove(3, "解除配送关系");

	private int key;
	private String value;

	private DelStatus(int key, String value) {
		this.key = key;
		this.value = value;
	}

	public static String getName(int key) {
		for (DelStatus ut : DelStatus.values()) {
			if (ut.key == key) {
				return ut.value;
			}
		}
		return "";
	}

	public static DelStatus getDelRelationStatus(int key) {
		for (DelStatus ut : DelStatus.values()) {
			if (ut.key == key) {
				return ut;
			}
		}
		return null;
	}

	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

}
